home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / DVFLOPPY.TEC < prev    next >
Text File  |  1992-03-09  |  4KB  |  83 lines

  1. ID:DK DESQview: Why floppy access is so slow       
  2. Quarterdeck Technical Note #230
  3. by Vernon Balbert and Michael Bolton
  4.  
  5.  
  6. Q:   Why is floppy disk access so slow when I'm in DESQview?
  7.  
  8. A:   Actually, floppy disk access isn't slower under DESQview. Accessing a 
  9. floppy disk slows down everything else under DESQview, including DESQview 
  10. itself.  There are two reasons for this.  First, when you are in DESQview, a 
  11. certain amount of overhead is expected under any operation.  However, this 
  12. doesn't explain why other operations aren't slowed nearly as much as floppy 
  13. access.
  14.  
  15. DOS is only loaded once:  when you boot your machine.  Programs normally make 
  16. calls to DOS when they want some service provided by DOS, such as reading from 
  17. and writing to disks.  DOS is only intended to be run once at a time.  DOS was 
  18. never intended to be a multi-tasking operating system.  It was not written to 
  19. be re-entrant.
  20.  
  21. Re-entrancy is the ability of one piece of code to be able to be run many 
  22. times simultaneously while it is only loaded once.  Thus, it is possible to 
  23. write a program in such a way that you can load it only once but it can be 
  24. accessed by many programs at the same time.  DOS can't do this.  It expects 
  25. only one thing to be happening at one time.  When a floppy is accessed, the 
  26. program calls DOS and says to it, "I need to read the next 10240 bytes from 
  27. A:" or something to that effect.  DOS complies and starts the transfer 
  28. process.  A hard disk is sufficiently fast that you don't notice any slowdown 
  29. as DOS comes back with the information almost right away.  On a floppy, 
  30. however, the access time is so slow (300 milliseconds, as opposed to 28 
  31. milliseconds or less for hard drives) that everything has to stop while the 
  32. data is being retrieved from the floppy.  Since it takes a long time for any 
  33. information to get to or from the floppy, and since DOS is in use while the 
  34. floppy is being accessed, everything else slows down.
  35.  
  36. DOS has a way to indicate to other programs that a DOS call is in progress. 
  37. This is called the InDOS flag; when a program is using DOS, this flag is up, 
  38. or "set"; when no program is using DOS, the InDOS flag is down, or "clear". 
  39. Programs must inspect the status of the InDOS flag before they enter a DOS 
  40. call, and should proceed only when the InDOS flag is clear.  DESQview honors 
  41. this convention, prohibiting more than one program from entering DOS 
  42. simultaneously, and thus avoids system crashes.
  43.  
  44. Floppy access is notoriously timing-sensitive.  Because the original PC ran at 
  45. 4.77 MHz, some computer manufacturers slow down their system clocks to 4.77 
  46. MHz during floppy I/O to assure floppy compatibility. Of course this slows 
  47. down all operations during floppy I/O.  It is instructive to look at the First 
  48. Meg/Timings screen of Manifest during floppy access.
  49.  
  50.  
  51. Q:   How can I improve things?
  52.  
  53. A:   Third-party utilities exist which allow you to format, diskcopy, and copy 
  54. to floppy disks without interfering with multi-tasking. These programs use the 
  55. BIOS or access the hardware directly for formatting, rather than using DOS 
  56. services.  Since BIOS services can be interrupted more easily than DOS calls, 
  57. performance in other windows improves markedly.  Such utilities can be found 
  58. on the Quarterdeck BBS (310-314-3227), on Compuserve in the PCVENB section, or 
  59. on many large local BBSs.
  60.  
  61. Experiment with the DOS Buffer for EMS setting.  The setting for DOS Buffer 
  62. for EMS (found in Setup DESQview / Advanced Options / Performance) should be 
  63. increased to 10 if you are on a machine that is connected to a network.  If 
  64. you fall into neither of those categories and are using a 386 or higher 
  65. machine, try setting DOS Buffers for EMS to 0.
  66.  
  67.  
  68. Summary
  69. =======
  70.  
  71. While DESQview can multi-task, DOS can't.  Because of this, when a floppy disk 
  72. is accessed, everything else in DESQview needs to wait until DOS comes back 
  73. with the information requested from the floppy.
  74.  
  75.  
  76.   ************************************************************************
  77.   *This technical note may be copied and distributed freely as long as it*
  78.   *is distributed in its entirety and it is not distributed for profit.  *
  79.   *          Copyright (C) 1991 by Quarterdeck Office Systems            *
  80.   ************************ E N D   O F   F I L E *************************
  81.  
  82.  
  83.